﻿@model GameSchool.ViewModels.Event.ListViewModel
@{
    ViewBag.Title = "Vísindaferðir";
}
<h2>
    Vísindaferðir</h2>
<p>
    <a href="@Url.Action("Create")" class="btn">Skrá nýja vísindaferð</a>
</p>
<table class="table table-striped">
    <tr>
        <th>
            Fyrirtæki
        </th>
        <th>
            Dagsetning
        </th>
        <th>
            Fj. skráðir
        </th>
        <th>
            Fj. leyfilegur
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model.eventListModel)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.CompanyName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EventStarts)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EventStudents.Count)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MaximumAttendees)
            </td>
            <td>
                <a href="@Url.Action("Edit", new { id = item.EventID })" class="btn btn-mini">Breyta</a>
            </td>
        </tr>
    }
</table>
